package com.eatme.web.common.vo;

public enum ResponseCode {
    SUCCESS(true,20000,"操作成功"),
    UNKNOWN_ERROR(false,20001,"未知错误"),
    PARAM_ERROR(false,20002,"参数错误"),
    NULL_POINT(false,20003,"空指针异常"),
    HTTP_CLIENT_ERROR(false,20004,"http连接错误"),
    UNAUTHORIZED(false,20005,"权限受控"),
    ACCESS_TOKEN_INVALID(false,20006,"token失效"),
    UN_KNOWN_ACCOUNT(false,20008,"账户不存在"),
    LOCKED_ACCOUNT(false,20009,"用户帐号已被锁定"),

    DISABLED_ACCOUNT(false,20007,"用户已失效"),
    INCORRECT_CREDENTIALS(false,20009,"密码错误"),
    NEED_LOGIN(false,20010,"需要登陆"),
    AUTHORIZATION(false,20011,"认证失败"),
    UN_KNOWN_SESSION(false,20012,"认证失败"),

//    (false,20006,""),
//    (false,20007,""),
    ;

    // 响应是否成功
    private Boolean success;
    // 响应状态码
    private Integer code;
    // 响应信息
    private String message;

    public Boolean getSuccess() {
        return success;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ResponseCode(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }
}
